//
//  TravelRouteCollectionViewCell.m
//  TravelFirst
//
//  Created by lanou3g on 15/9/19.
//  Copyright (c) 2015年 吴娅君. All rights reserved.
//

#import "TravelRouteCollectionViewCell.h"

@implementation TravelRouteCollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame{
    if(self=[super initWithFrame:frame]){
        
        //获取当前cell的高度和宽度
        CGFloat width=frame.size.width;
        CGFloat height=frame.size.height;
        self.backgroundColor=[UIColor purpleColor];
        _img=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, width, height)];
        _img.backgroundColor=[UIColor grayColor];
        [self addSubview:_img];
        _lab=[[UILabel alloc] initWithFrame:CGRectMake(0, height-20, width, 20)];
        _lab.textAlignment=NSTextAlignmentCenter;
        _lab.font=[UIFont boldSystemFontOfSize:13];
        _lab.textColor=[UIColor whiteColor];
        [_lab setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"bg_top_320x64@2x"]]];
        [_img addSubview:_lab];
    }
    return self;
}
@end
